//
//  JAGPlacementModel.h
//  JAGatherAdDemo
//
//  Created by Yc on 2022/5/27.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface JAGSourceInfo : NSObject
@property (nonatomic, copy) NSString *appId;//应用ID
/// 数耀广告id传这个
@property (nonatomic, copy) NSString *unitId;//广告位ID
@property (nonatomic, copy) NSString *personalizedTemplate;
@property (nonatomic, copy) NSString *zoomOutAdSw;
@property (nonatomic, copy) NSString *isVideo;
@property (nonatomic, copy) NSString *layoutType;
@property (nonatomic, copy) NSString *size;
@property (nonatomic, copy) NSString *unitVersion;
@property (nonatomic, copy) NSString *unitType;
@property (nonatomic, copy) NSString *videoMuted;
@property (nonatomic, copy) NSString *videoAutoplay;
@property (nonatomic, copy) NSString *videoDuration;
@property (nonatomic, copy) NSString *isFullscreen;
@property (nonatomic, copy) NSString *mediaRatio;
@property (nonatomic, copy) NSString *orientation;
@property (nonatomic, copy) NSString *videoSound;
@property (nonatomic, copy) NSString *buttonType;
@property (nonatomic, copy) NSString *ctaButton;
@property (nonatomic, copy) NSString *dlType;
@property (nonatomic, copy) NSString *custom;
@property (nonatomic, copy) NSString *account;
@property (nonatomic, copy) NSString *adapter;
@property (nonatomic, copy) NSString *key;
@property (nonatomic, copy) NSString *insertionType;//插屏类型
@property (nonatomic, assign) NSInteger ksBidType;//0:v1 1:v2
//拼多多参数
@property (nonatomic, copy) NSString *adxId;//媒体id
@property (nonatomic, copy) NSString *adxSecret;//媒体密钥
@property (nonatomic, copy) NSString *templatesId;//播放形式id
@property (nonatomic, copy) NSString *tagId;//资源位id
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *sensitivity;//灵敏度控制值
@property (nonatomic, copy) NSString *bidFloor;//底价（单位分）
//Adx
@property (nonatomic, assign) CGFloat adPriceRatio;
@property (nonatomic, assign) NSInteger creativeStyle;
@property (nonatomic, assign) CGFloat shakeSensitivity;
@property (nonatomic, assign) NSInteger autoClick;

@property (nonatomic, copy) NSString *adid;//百度竞价成功后新的广告位id
@property (nonatomic, copy) NSString *token;//优量汇竞价成功后token
@property (nonatomic, strong) NSArray *nurl;//竞价胜出时 调用的胜出通知 URL
@property (nonatomic, strong) NSArray *lurl;//竞价失败时，调用的通知URL
@property (nonatomic, assign) NSInteger bivalent;//二价（多家竟胜取二价，一家竟胜取低价）

@end


@interface JAGAdSupplier : NSObject
@property (nonatomic, copy) NSString *sourceId;
@property (nonatomic, copy) NSString *sourceName;
@property (nonatomic, copy) NSString *platformId;
@property (nonatomic, copy) NSString *platformName;
@property (nonatomic, assign) int ecpm;
@property (nonatomic, assign) int ecpmRank;
@property (nonatomic, assign) int bottomType;
@property (nonatomic, assign) int autoEcpmSwitch;
@property (nonatomic, assign) int autoEcpm;
@property (nonatomic, assign) int headerBiddingSwitch;//0 关闭 1 服务端竞价 2 客户端竞价
@property (nonatomic, assign) int showTimesHour;
@property (nonatomic, assign) int showTimesDay;
@property (nonatomic, assign) int showIntervalSecond;
@property (nonatomic, strong) JAGSourceInfo *sourceInfo;
@property (nonatomic, copy) NSString *advValue;
@property (nonatomic, assign) NSInteger adxEcpm;
@end


@interface JAGRule : NSObject
@property (nonatomic, assign) int ruleType;
@property (nonatomic, assign) int ruleOperator;
@property (nonatomic, copy) NSString *content;
@end


@interface JAGSegment : NSObject
@property (nonatomic, copy) NSString *segmentId;
@property (nonatomic, copy) NSString *segmentName;
@property (nonatomic, assign) int isDefault;
@property (nonatomic, assign) int priority;
@property (nonatomic, assign) int autoRefresh;
@property (nonatomic, copy) NSString *baseBidding;
@property (nonatomic, assign) int advRequestTimeout;//广告位请求超时时间（秒）
@property (nonatomic, assign) int headerBiddingTimeout;
@property (nonatomic, assign) int parallelRequestType;
@property (nonatomic, assign) int parallelRequestNum;
@property (nonatomic, assign) int showTimesHour;
@property (nonatomic, assign) int showTimesDay;
@property (nonatomic, assign) int showIntervalSecond;
@property (nonatomic, copy) NSString *adsRequestTimeout;//广告源超时时间（单位：毫秒）
@property (nonatomic, assign) int reqDelayTime;//兜底请求发起时间（单位：毫秒）
@property (nonatomic, assign) int callbackType;//1-展示优先；2-价格优先。Default: 2
@property (nonatomic, copy) NSString *updateTime;//广告位流量组策略更新时间(单位：毫秒)
@property (nonatomic, strong) NSArray<JAGRule*> *rules;
@property (nonatomic, strong) NSArray<JAGAdSupplier*> *sourceList;
@end


@interface JAGAbTestItem : NSObject
@property (nonatomic, copy) NSString *abTestItemId;
@property (nonatomic, copy) NSString *abTestItemName;
@property (nonatomic, assign) int trafficVariation;//A/B测试组的权重
@property (nonatomic, assign) NSInteger applicationId;
@property (nonatomic, strong) NSArray<JAGSegment*> *segmentList;
@end

@interface JAGAdvType : NSObject
@property (nonatomic, assign) int advType;
@property (nonatomic, copy) NSString *advValue;
@end


@interface JAGTestDevice : NSObject
@property (nonatomic, copy) NSString *device;//IDFA、IDFV
@property (nonatomic, copy) NSString *deviceName;
@property (nonatomic, copy) NSString *platformId;
@property (nonatomic, strong) NSArray<JAGAdvType*> *advType;
@end

@interface JAGTestData : NSObject
@property (nonatomic, copy) NSString *abTestId;
@property (nonatomic, copy) NSString *abTestName;
@property (nonatomic, strong) NSArray<JAGAbTestItem*> *abTestItems;
@end


@interface JAGPlacementModel : NSObject
// 状态: 1 启动 、2 暂停
@property (nonatomic, assign) NSInteger spaceState;
@property (nonatomic, copy) NSString *abTestId;
@property (nonatomic, copy) NSString *abTestName;
@property (nonatomic, assign) int advType;
@property (nonatomic, strong) NSArray<JAGAbTestItem*> *abTestItems;
@property (nonatomic, strong) NSArray<JAGTestDevice*> *testDeviceList;
@property (nonatomic, strong) JAGTestData *testData;

@end



NS_ASSUME_NONNULL_END


